<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>03_边框与内边距测试</title>
    <style>
        .d1{
            width: 200px;
            height: 200px;
            background-color: #f0f;
            /*border-top: 9px dotted #000;*/
            /*border-top: 9px double #000;*/
            /*border-bottom: 50px solid #000;*/
            border-radius:100px
           /* border: 5px solid #f00;*/
        }
        .d2{
            width: 200px;
            height: 500px;
            background-color: #558520;
            border-radius: 100px;
    
        }
        .d3{
            width: 500px;
            height: 250px;
            background-color: #157a93;
            border-radius: 250px/125px;
        }
        .d4{
            width: 200px;
            height: 200px;
            background-color: cyan;
            /*加边框与内边距都会让元素变大*/
            border: 10px solid #00f;
            padding-left:50px;
            /*外间距会占据页面布局空间，但外边距不属于元素本身*/
            margin: 50px;
            /*将盒子模型的计算方案切换为边框盒子：
            无论是加内边距还是边框，元素的大小都算在预设的宽高内*/
            box-sizing:border-box;
        }
        span{
            background-color: #ff0;
        }
        .s2{
            /*行内元素垂直方向上的内外编剧都不生效！不要用！*/
            padding: 50px;
        }
    </style>

</head>
<body>
    <div class="d1"></div>
    <div class="d2"></div>
    <div class="d3"></div>
    <div class="d4">我是内容</div>
    
    <span>span1</span>
    <span class="s2">span2</span>
    <span>span3</span>
    <h1>我是标题一哈哈哈</h1>
</body>
</html>